package com.example.designpatterns.chain;
/**具体处理类T2
 * 处理10天以下假期，包含10天
 */
public class LeaderT2 extends Leader{
    public LeaderT2(String name){
        super(name);
    }
    @Override
    public void handleRequest(LeaveNode leaveNode){
        if(leaveNode.getNumber() <=10){
            System.out.println("T2:"+name+",审批:" +leaveNode.getPerson()+"假条，天数："+ leaveNode.getNumber());
        }else {
            if(this.successor != null){
                this.successor.handleRequest(leaveNode);
            }
        }
    }
}
